home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat7 / serial.z / serial
Encoding:
Text File  |  2002-10-03  |  23.2 KB  |  590 lines

  1.  
  2.  
  3.  
  4. sssseeeerrrriiiiaaaallll((((7777))))                                                            sssseeeerrrriiiiaaaallll((((7777))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      serial - serial communication ports
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////ddddeeeevvvv////ttttttttyyyy<ttttyyyyppppeeee><ppppoooorrrrttttnnnnoooo>
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      All Silicon Graphics systems have two or more general purpose serial
  16.      ports.  These ports can be used to connect terminals, printers, modems,
  17.      other systems, or graphical input devices such as a tablet or dial and
  18.      button box.  Each line can be independently set to run at any of several
  19.      speeds.  Various character echoing and interpreting parameters can also
  20.      be set.  See _s_t_t_y(1) and _t_e_r_m_i_o(7) for details on the various modes.
  21.  
  22.      Details of the serial ports found on optional add-on boards are given
  23.      elsewhere.  The Audio/Serial Option for CHALLENGE/Onyx provides six
  24.      high-speed serial ports, see _a_s_o_s_e_r(7) for more information.  The CDSIO
  25.      VME board provides six serial ports; see _c_d_s_i_o(7) for more information.
  26.  
  27.      Special files for the serial ports exist in the /_d_e_v directory. These
  28.      files are named ttttttttyyyy<ttttyyyyppppeeee><ppppoooorrrrttttnnnnoooo>, where ttttyyyyppppeeee is one or more characters
  29.      indicating the type of interface to the hardware that this file provides,
  30.      and ppppoooorrrrttttnnnnoooo is a number identifying the physical port. The descriptions
  31.      below indicate among other things which hardware signals are used by each
  32.      port type. For more details on this see SOFTWARE USAGE below. Currently
  33.      supported types include:
  34.  
  35.      _dddd    e.g. ttyd1. This is the most basic serial port type. It supports
  36.           TD/RD only.
  37.  
  38.      _mmmm    e.g. ttym1. This port type provides modem control. It supports TD/RD
  39.           and DCD/DTR.
  40.  
  41.      _ffff    e.g. ttyf1. This port type provides modem and flow control. It
  42.           supports TD/RD, DCD/DTR and RTS/CTS.
  43.  
  44.      The following types are supported on O2, OCTANE, Origin2000/200, Origin
  45.      3000/300, Onyx2, Onyx3, and Challenge/Onyx systems:
  46.  
  47.      _cccc    e.g. ttyc1. This port type provides a raw character device interface
  48.           to the hardware. It is intended for applications which wish to do
  49.           bulk data transfer with minimal overhead and no data interpretation.
  50.           Since this is not a streams device and no line discipline exists,
  51.           streams or line discipline related ioctl commands may fail or
  52.           silently have no effect. See cserialio(7) for details.  This port
  53.           type supports only TD/RD by default but RTS/CTS flow control may be
  54.           enabled via ioctl if the hardware supports it.
  55.  
  56.      _mmmm_iiii_dddd_iiii e.g. ttymidi1. This port type provides a midi interface to the
  57.           serial device. See midi(3).
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. sssseeeerrrriiiiaaaallll((((7777))))                                                            sssseeeerrrriiiiaaaallll((((7777))))
  71.  
  72.  
  73.  
  74.      The following types are supported on OCTANE, Origin2000/200, Origin
  75.      3000/300, Onyx2, Onyx3, and Challenge/Onyx systems:
  76.  
  77.      _4444_dddd   e.g. tty4d1. This port type enables RS422 (Appletalk) mode. It uses
  78.           TxD+/-, RxD+/-. On Challenge/Onyx, every 4th port (tty4d4, tty4d8,
  79.           etc.) is hardwired to RS422 and other ports are hardwired to RS232,
  80.           so this port type only exists for every 4th port.  Not present on
  81.           O2.
  82.  
  83.      _4444_ffff   e.g. tty4f1. This port type enables RS422 (Appletalk) mode including
  84.           the handshake signals. It uses TxD+/-, RxD+/-, HSKo and HSKi. On
  85.           Challenge/Onyx, every 4th port (tty4d4, tty4d8, etc.) is hardwired
  86.           to RS422 and other ports are hardwired to RS232, so this port type
  87.           only exists for every 4th port.  Not present on O2.
  88.  
  89.      In general, a serial port which is identified as the console port
  90.      (typically port 1) cannot be opened in RS422 mode.  This is because some
  91.      programs may open /dev/console which is internally linked to the basic
  92.      serial port ttyd<ppppoooorrrrttttnnnnoooo> interface type.
  93.  
  94.      For systems which do not natively support RS-422 (eg. O2), RS-232/RS-422
  95.      serial adapter hardware is available from Silicon Graphics.
  96.  
  97.      The following type is supported on O2, OCTANE, Onyx2, Origin2000/200 and
  98.      Origin3000/300 systems:
  99.  
  100.      _uuuu_ssss   e.g. ttyus1. This port type provides a user mapped interface to the
  101.           hardware, allowing reading and writing of bytes without any system
  102.           call overhead. Use of this port requires installation of the
  103.           react.sw.usio subsystem of REACT/Pro. See usio(3) for details.
  104.  
  105.      The ppppoooorrrrttttnnnnoooo component of the tty filename identifies the actual hardware
  106.      accessed by the device file. All tty files with the same port number
  107.      access the same hardware, i.e. ttyd1, ttyc1 and ttymidi1 all access the
  108.      same physical port. A given tty device may be opened any number of times,
  109.      but only one interface type may be opened to the same physical port at a
  110.      time, e.g. if ttyd1 is open, access will be denied to ttyf1 or ttyc1.  On
  111.      Onyx2 systems with console set to d, and on Origin2000 and Origin200
  112.      systems, the console port and its twin are guaranteed to be ports 1 and
  113.      2, all other ports are dynamically assigned port numbers as per the whims
  114.      of ioconfig(1). It may be necessary to obtain the absolute path of the
  115.      port in the filesystem by resolving links until a true device is found in
  116.      order to determine where on the machine the port is actually located.
  117.  
  118. CCCCOOOONNNNNNNNEEEECCCCTTTTOOOORRRRSSSS AAAANNNNDDDD PPPPIIIINNNN AAAASSSSSSSSIIIIGGGGNNNNMMMMEEEENNNNTTTTSSSS
  119.      There are five different types of connectors found on various 4D models.
  120.      Note that in terms of connectors and pin assignments, the Challenge S is
  121.      identical to the Indy and both Challenge M and Power Challenge M are
  122.      equivalent to the Indigo2.  The DB-9 male serial port connectors on O2,
  123.      OCTANE, Onyx2, Origin2000/200 and Origin3000/300 systems have the
  124.      following IBM(R) PC/AT(tm)-like pin assignments:
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. sssseeeerrrriiiiaaaallll((((7777))))                                                            sssseeeerrrriiiiaaaallll((((7777))))
  137.  
  138.  
  139.  
  140.                                 -------------------
  141.                                 \  1  2  3  4  5  /
  142.                                  \   6  7  8  9  /
  143.                                   ---------------
  144.  
  145.                          Pin   Name   Description
  146.                          ________________________________
  147.                           1    DCD    Data Carrier Detect
  148.                           2    RD     Receive Data
  149.                           3    TD     Transmit Data
  150.                           4    DTR    Data Terminal Ready
  151.                           5    GND    Signal Ground
  152.                           6    -      reserved
  153.                           7    RTS    Request To Send
  154.                           8    CTS    Clear To Send
  155.                           9    -      reserved
  156.                              |||||||||||
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.                                     |||||||||||
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.      The ports on OCTANE, Onyx2, Origin2000/200 and Origin3000/300 systems can
  177.      be set by software to an Appletalk-compatible RS-422-like mode, in which
  178.      they have the following pin assignments:
  179.  
  180.                            Pin   Name   Description
  181.                            _____________________________
  182.                             1    -      reserved
  183.                             2    RxD-   Receive Data -
  184.                             3    TxD-   Transmit Data -
  185.                             4    TxD+   Transmit Data +
  186.                             5    GND    Signal Ground
  187.                             6    RxD+   Receive Data +
  188.                             7    HSKo   Output Handshake
  189.                             8    HSKi   Input Handshake
  190.                             9    -      reserved
  191.                                |||||||||||
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                                       |||||||||||
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.      The DB-9 female serial port connectors, which are found on the CHALLENGE
  212.      and Onyx systems, have the following pin assignments.
  213.  
  214.                                 -------------------
  215.                                 \  5  4  3  2  1  /
  216.                                  \   9  8  7  6  /
  217.                                   ---------------
  218.  
  219.                          Pin   Name   Description
  220.                          ________________________________
  221.                           2    TD     Transmit Data
  222.                           3    RD     Receive Data
  223.                           4    RTS    Request To Send
  224.                           5    CTS    Clear To Send
  225.                           7    SG     Signal Ground
  226.                           8    DCD    Data Carrier Detect
  227.                           9    DTR    Data Terminal Ready
  228.                              |||||||||
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.                                     |||||||||
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.                                                                         PPPPaaaaggggeeee 3333
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254. sssseeeerrrriiiiaaaallll((((7777))))                                                            sssseeeerrrriiiiaaaallll((((7777))))
  255.  
  256.  
  257.  
  258.      The CHALLENGE and Onyx systems provide an RS-422 port.  This RS-422 port
  259.      uses a DB-9 female serial connector and has the following pin
  260.      assignments.
  261.  
  262.                          Pin   Name   Description
  263.                          ________________________________
  264.                           1    DTR    Data Terminal Ready
  265.                           2    TxD-   Transmit Data -
  266.                           3    RxD-   Receive Data -
  267.                           4    DCD    Data Carrier Detect
  268.                           5    CTS    Clear To Send
  269.                           6    SG     Signal Ground
  270.                           7    TxD+   Transmit Data +
  271.                           8    RxD+   Receive Data +
  272.                           9    RTS    Request to send
  273.                              |||||||||||
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.                                     |||||||||||
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.      In order to support peripherals that draw power from the host system, the
  294.      CHALLENGE and Onyx systems provide two powered-peripheral serial ports.
  295.      These ports have a DIN-8 connector.  The powered ports share the tty2 and
  296.      tty3 signal lines with the standard DB-9 connectors; if the DB-9
  297.      connector for tty2 is already in use, you cannot use the powered
  298.      peripheral connector for tty2.  Similarly, if tty3's DB-9 connector is
  299.      connected to a peripheral, the powered peripheral port connected to the
  300.      tty3 signal lines cannot also be used.  The powered peripheral ports have
  301.      the following pin assignments.
  302.  
  303.                                       __---__
  304.                                      /   2   \
  305.                                     /4       5\
  306.                                    /           \
  307.                                   ( 1    8    3 )
  308.                                    \           /
  309.                                     \ 6     7 /
  310.                                      ---___---
  311.  
  312.                         Pin   Name     Description
  313.                         __________________________________
  314.                          1    DTR      Data Terminal Ready
  315.                          2    CTS      Clear To Send
  316.                          3    STEREO   Stereo field sync
  317.                          4    RD       Receive Data
  318.                          5    TD       Transmit Data
  319.                          6    SG       Signal Ground
  320.                          7    GND      Ground point
  321.                          8    V10P     10V supply
  322.                             ||||||||||
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.                                      ||||||||||
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.      The DIN-8 serial port connectors on the Indigo, Indy, Indigo2, Challenge
  341.      S, Challenge M, Power Challenge M, and the MENET 4-Enet, 6-serial board
  342.      (XT-FE-4TX-6A) have the following pin assignments.
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.                                                                         PPPPaaaaggggeeee 4444
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357. sssseeeerrrriiiiaaaallll((((7777))))                                                            sssseeeerrrriiiiaaaallll((((7777))))
  358.  
  359.  
  360.  
  361.                                      ---------
  362.                                     / 8  7  6 \
  363.                                    (  5  4  3  )
  364.                                     \  2   1  /
  365.                                      ---------
  366.  
  367.                       4D Compatible Pin Assignments (RS-232)
  368.                      _________________________________________
  369.                       Pin     Name      Description
  370.                      _________________________________________
  371.                        1      DTR       Data Terminal Ready
  372.                        2      CTS       Clear To Send
  373.                        3      TD        Transmit Data
  374.                        4      SG        Signal Ground
  375.                        5      RD        Receive Data
  376.                        6      RTS       Request To Send
  377.                        7      DCD       Data Carrier Detect
  378.                        8      SG        Signal Ground
  379.                             ||||||||||
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.                                       ||||||||||
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                  Macintosh SE Compatible Pin Assignments (RS-422)
  398.                  _________________________________________________
  399.                  Pin    Name    Description
  400.                  _________________________________________________
  401.                   1     HSKo    Output Handshake
  402.                   2     HSKi    Input Handshake Or External Clock
  403.                   3     TxD-    Transmit Data -
  404.                   4     GND     Signal Ground
  405.                   5     RxD-    Receive Data -
  406.                   6     TxD+    Transmit Data +
  407.                   7     GPi     General Purpose Input
  408.                   8     RxD+    Receive Data +
  409.                       ||||||||||
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.                               ||||||||||
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427. SSSSOOOOFFFFTTTTWWWWAAAARRRREEEE UUUUSSSSAAAAGGGGEEEE
  428.      The set of signals that are actually used depends upon which form of the
  429.      device was opened.  If the ttttttttyyyydddd name was used, only TTTTDDDD, RRRRDDDD, and SSSSGGGG
  430.      signals are meaningful.  These three signals are typically used with
  431.      "dumb" devices that either do not need any sort of data flow control or
  432.      use software flow control (see the description of the iiiixxxxoooonnnn, iiiixxxxaaaannnnyyyy, and
  433.      iiiixxxxooooffffffff options in _s_t_t_y(1) for more information on setting up software flow
  434.      control).  If the ttttttttyyyymmmm device is used, the DDDDCCCCDDDD, and DDDDTTTTRRRR signals are also
  435.      used.  These signals provide a two way handshake for establishing and
  436.      breaking a communication link with another device and are normally used
  437.      when connecting via a modem.  When the port is initially opened, the host
  438.      asserts the DDDDTTTTRRRR line and waits for the DDDDCCCCDDDD line to become active.  If the
  439.      port is opened with the OOOO____NNNNDDDDEEEELLLLAAAAYYYY flag, the open succeeds even if the DDDDCCCCDDDD
  440.      line is not active.  A hangup condition occurs if the DDDDCCCCDDDD line
  441.      transitions from active to inactive.  See _o_p_e_n(2), and _t_e_r_m_i_o(7) for more
  442.      information.  If the ttttttttyyyyffff device is used, all of the signals are used.
  443.      The additional signals provide for full hardware flow control between the
  444.      host and the remote device.  The RRRRTTTTSSSS line is asserted by the host
  445.      whenever it is capable of receiving more data.  The CCCCTTTTSSSS line is sampled
  446.      before data is transmitted and if it is not active, the host suspends
  447.      output until it is.
  448.  
  449.  
  450.  
  451.  
  452.                                                                         PPPPaaaaggggeeee 5555
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459. sssseeeerrrriiiiaaaallll((((7777))))                                                            sssseeeerrrriiiiaaaallll((((7777))))
  460.  
  461.  
  462.  
  463.      The DIN-8 serial port connectors on the Indy, Challenge S, Indigo2,
  464.      Challenge M, Power Challenge M, and MENET 4-Enet, 6-serial board (XT-FE-
  465.      4TX-6A) can be used to communicate with serial devices using RS-422
  466.      protocol.  User can use the stream ioctl commands, SSSSIIIIOOOOCCCC____EEEEXXXXTTTTCCCCLLLLKKKK and
  467.      SSSSIIIIOOOOCCCC____RRRRSSSS444422222222, defined in /_u_s_r/_i_n_c_l_u_d_e/_s_y_s/_z_8_5_3_0._h to switch between
  468.      internal/external clock and RS-232/RS-422 protocols.  Another command
  469.      that can be useful is SSSSIIIIOOOOCCCC____IIIITTTTIIIIMMMMEEEERRRR; it informs the driver how long it
  470.      should buffer up input data, in clock ticks, before sending them
  471.      upstream.  Data can sometimes be sent upstream before, but never after,
  472.      this time limit.  This feature reduces the cpu cost of receiving large
  473.      amounts of data by sending data upstream in large chunks.  This duration
  474.      can also be configured into the kernel by tuning the duart_rsrv_duration
  475.      variable.  On Origin, Onyx2, O2 and Octane systems, the serial hardware
  476.      sets an input timer based on the value passed in through SIOC_ITIMER. For
  477.      soft flow control, this input timer may result in excessively slow
  478.      response to an XOFF request since an XOFF char is not detected by the
  479.      software until the hardware timer expires. If soft flow control skid is
  480.      unacceptably large, it may be necessary to reduce the latency of the
  481.      hardware input timer by reducing the value passed to SIOC_ITIMER.
  482.  
  483. SSSSUUUUPPPPPPPPOOOORRRRTTTTEEEEDDDD SSSSPPPPEEEEEEEEDDDDSSSS
  484.      The serial ports of all SGI systems support several standard rates up
  485.      through 38400 bps (see _t_e_r_m_i_o(_7) for these standard rates). The serial
  486.      ports on O2, OCTANE, Origin2000/200, Onyx2, Origin3000/300, and Onyx3
  487.      systems also support bit rates up through 115200 bps, including the
  488.      following rates:
  489.  
  490.                                   31250   57600
  491.                                   76800   115200
  492.  
  493.      Many other rates, up to 460800, can be set.  The accuracy of actual baud
  494.      rate set is guaranteed to be within 2.5% of the desired rate.  If this
  495.      condition cannot be met, the command (ioctl or stty) will fail.  However,
  496.      performance at baud rates above 115200 is not guaranteed, and their use
  497.      is not officially supported.
  498.  
  499.      At baud rates above 38400, cable length and quality become quite
  500.      important.  These rates are more likely to work in RS-422 mode, on
  501.      systems that support it.
  502.  
  503. CCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE LLLL////XXXXLLLL AAAANNNNDDDD OOOONNNNYYYYXXXX PPPPOOOORRRRTTTT CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN
  504.      By default, Onyx and CHALLENGE L/XL systems enable only the serial ports
  505.      of the master IO4.  To enable the serial ports on other IO4 boards, a
  506.      vector line must be added for the epcserial device to
  507.      /_v_a_r/_s_y_s_g_e_n/_s_y_s_t_e_m/_i_r_i_x._s_m.  The following vector line configures the
  508.      serial ports on the IO4 in slot 13 as tty45, tty46, and tty47:
  509.  
  510.           VECTOR: bustype=EPC module=epcserial unit=1 slot=13
  511.  
  512.      The first two options (bustype and module) are mandatory and tell
  513.      _l_b_o_o_t(1M) that you're configuring serial ports.  The uuuunnnniiiitttt option
  514.      specifies which set of tty names should be used for this set of ports:
  515.  
  516.  
  517.  
  518.                                                                         PPPPaaaaggggeeee 6666
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525. sssseeeerrrriiiiaaaallll((((7777))))                                                            sssseeeerrrriiiiaaaallll((((7777))))
  526.  
  527.  
  528.  
  529.      unit 1 corresponds to the logical devices tty45, tty46, and tty47; unit 2
  530.      represents devices tty49, tty50, and tty51; unit 3 specifies devices
  531.      tty53, tty54, and tty55.  Finally, the ssssllllooootttt option indicates which IO4
  532.      board contains the ports that should be mapped.  Each board must have its
  533.      own vector line.  Configuring one IO4 board's serial ports has no effect
  534.      on any of the other boards.  After iiiirrrriiiixxxx....ssssmmmm has been updated, the
  535.      _a_u_t_o_c_o_n_f_i_g(1M) command should be issued to reconfigure the kernel.  It
  536.      may also be necessary to execute _M_A_K_E_D_E_V(1M) in order to build device
  537.      files for the new ports.
  538.  
  539.      If the system is unable to honor the VECTOR line for some reason (if, for
  540.      example, the specified slot is invalid), a warning message is written to
  541.      /_v_a_r/_a_d_m/_S_Y_S_L_O_G.  These warning messages contain the string eeeeppppccccsssseeeerrrriiiiaaaallll, in
  542.      order to facilitate finding them with commands like _g_r_e_p(1).  Because the
  543.      console port has not been initialized when these messages are issued, the
  544.      kernel is unable to display the warning on the console.
  545.  
  546.      Only the master IO4 provides an RS-422 port (tty4).  Additional IO4
  547.      boards support three RS-232 serial ports only.  To allow for future
  548.      expansion, however, space was left in the serial port namespace for the
  549.      additional RS-422 ports.  For this reason, there is no actual device
  550.      associated with tty48, tty52, and tty56.
  551.  
  552. FFFFIIIILLLLEEEESSSS
  553.      /dev/tty[dmf][1-4,45-56]
  554.      /usr/include/sys/z8530.h
  555.      /dev/MAKEDEV
  556.      /var/sysgen/system
  557.  
  558. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  559.      system(4), asoser(7), cdsio(7), keyboard(7), streamio(7), termio(7),
  560.      termios(3), cserialio(7), usio(3).
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.                                                                         PPPPaaaaggggeeee 7777
  585.  
  586.  
  587.  
  588.